import request from '@/utils/request'

export const addOneGoods = data => request({
  url: '/addOneGoods',
  method: 'put',
  data: data || {}
})

export const deleteOneGoods = id => request({
  url: '/deleteOneGoods/' + id,
  method: 'delete'
})

export const updateOneGoods = data => request({
  url: '/updateOneGoods',
  method: 'patch',
  data: data || {}
})

export const getOneGoods = id => request({
  url: '/getOneGoods/' + id,
  method: 'get'
})

export const getGoodsList = data => request({
  url: '/getGoodsList',
  method: 'post',
  data: data || {}
})

export const getAllGoodsList = () => request({
  url: '/getAllGoodsList',
  method: 'get'
})

